<template>
	<ResourcePage ref="refPageController" page-name="系统操作日志" scene="operation" @get:list="getTableData">
		<template #columns>
			<el-table-column prop="username" label="操作账户" align="center" />
			<el-table-column prop="device_name" label="操作设备" align="center" />
			<el-table-column prop="remark" label="操作内容" align="center" />
			<el-table-column prop="ip" label="操作 IP" align="center" />
			<el-table-column prop="add_time" label="操作日期" align="center" />
		</template>
	</ResourcePage>
</template>

<script setup>
import { ref } from 'vue'

import ResourcePage from '../components/ResourcePage.vue'
import { fetchLogsOperate } from '@/api/logs.services'
const refPageController = ref(null)

const getTableData = async (postData, { resolve }) => {
	const result = await fetchLogsOperate(postData)
	if (result.code == 1) {
		resolve({
			list: result.data.data,
			total: result.data.total
		})
	}
}
</script>
